<%@page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript">

$(document).ready(function(){
	

	$("#activeStatusInt",navTab.getCurrentPanel()).val("${pager.scMap.activeStatusInt}");

	$('#activeStatusInt', navTab.getCurrentPanel()).change(function(){ 
		searchProduct();
	});
	$('#prodDesc_L', navTab.getCurrentPanel()).blur(function(){ 
		searchProduct();
	});
	searchProduct=function(){
		$("#productList", navTab.getCurrentPanel()).loadUrl("prod/productInfoPager/prodList.do",{
			"map.activeStatusInt":$('#activeStatusInt', navTab.getCurrentPanel()).val(),
			'map.level_I':'${pager.getScMap().get("level_I")}',
			'map.prodDesc_L':$('#prodDesc_L', navTab.getCurrentPanel()).val()
		});
	};
});
</script>
<div layoutH="32" id="productTreeList">
<!-- 
	<div class="panelBar">
		<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="prod/productInfoPager/prodList.do?funId=${funId}" method="post">
			<ul class="toolBar">
				<li>名称型号：<input type="text" name="map.prodDesc_L" id="prodDesc_L" value="${pager.scMap.prodDesc_L}"/>
				</li>
				<li>状态：<select name="map.activeStatusInt" id="activeStatusInt">
						<option value="">全部</option>	
						<option value="1">正常</option>	
						<option value="0">停用</option>	
					</select>
					<input type="hidden" name="map.prodId" value="${pager.scMap.prodId}">
					<input type="hidden" name="map.smallTypeId" value="${pager.scMap.smallTypeId}">
					<input type="hidden" name="map.bigTypeId" value="${pager.scMap.bigTypeId}">
				</li>
				<li align="right">
					<a class="icon" href="#">
						<span>
						<c:forEach items="${prodPath}" var="item" varStatus="varStatus">
							${varStatus.count==1?'':'<-'} ${item.name}
						</c:forEach>
						</span>
					</a>
				</li>
			</ul>
		</form>
	</div>
 -->
	<table id="prodTreeTab" class="table" width="98%" targetType="navTab" asc="asc" desc="desc" layoutH="81">
		<thead>
			<tr>
				<th width="30">序号</th>
				<th width="85">数据类型</th>
				<th width="85">数据项名称</th>
				<th width="65">coid</th>
				<th width="60">bigType</th>
			    <th>备注</th>
			    <th width="30">状态</th>
			    <th width="65">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${pager.resultList}" var="item" varStatus="varStatus">
				<tr target="sid_" rel="${item.id}">
					<td align="right">${varStatus.count}</td>
					<td>${item.bigValue}</td>
					<td>${item.myValue}</td>
					<td align="right">${item.coid}</td>
					<td>${item.bigKey}</td>
			    	<td>${item.remark}</td>
			    	<td>${item.activeStatusInt==1?"正常":"停用"}</td>
					<td>
					<c:if test="${item.coid!=null}">
					    <a title="删除数据项" target="ajaxTodo" href="company/delDict/${item.id}.do?funId=${funId}" class="btnDel">删除</a>
						<a title="编辑数据项"  target="navTab" href="company/toEditDict/${item.id}.do?funId=${funId}" class="btnEdit" ref="dictEditor">编辑存货档案</a>
					</c:if>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

<div class="panelBar" >	
	<form id="pagerForm" method="post" action="${pager.action}">
		<input type="hidden" name="pageNum" value="${pager.pageNum }" />
		<input type="hidden" name="numPerPage" value="${pager.numPerPage}" />
		<input type="hidden" name="orderField" value="${orderField}" />
		<input type="hidden" name="orderDirection" value="${orderDirection}" />
	</form>
	<div class="pages">
		
		<span></span>
		<span>每页
		</span>
		<span>
					<select class="combox" name="${numPerPage }" onchange="navTabPageBreak({numPerPage:this.value},'productTreeList')">
						<option value="15" ${pager.numPerPage==15?"selected":""}>15</option>
						<option value="30" ${pager.numPerPage==30?"selected":""}>30</option>
						<option value="60" ${pager.numPerPage==60?"selected":""}>60</option>
					</select>
		</span>
		
		<span>
		条，${pager.totalPage}页，共${pager.totalCount}条</span>
	</div>
	<div class="pagination" rel="productTreeList" totalCount="${pager.totalCount}" numPerPage="${pager.numPerPage}" pageNumShown="10" currentPage="${pager.pageNum}">
	</div>
</div>

</div>

